}
static void
-property_data_free (PropertyData *data)
+property_data_remove_values (PropertyData *data)
{
guint i;
g_value_unset (&value_data->value);
}
+ if (data->values->len > 0)
+ g_array_remove_range (data->values, 0, data->values->len);
+}
+
+static void
+property_data_free (PropertyData *data)
+{
+ property_data_remove_values (data);
g_array_free (data->values, TRUE);
g_slice_free (PropertyData, data);
}
GValue *value;
data = &g_array_index (prop_to_merge->values, ValueData, i);
+
+ if (replace && data->state == GTK_STATE_FLAG_NORMAL &&
+ G_VALUE_TYPE (&data->value) != PANGO_TYPE_FONT_DESCRIPTION)
+ {
+ /* Let normal state override all states
+ * previously set in the original set
+ */
+ property_data_remove_values (prop);
+ }
+
value = property_data_get_value (prop, data->state);
if (G_VALUE_TYPE (&data->value) == PANGO_TYPE_FONT_DESCRIPTION &&